<?php
declare (strict_types = 1);

namespace app\service;

use app\dao\ExamDao;
use app\dao\PaperDao;

class ExamService extends \think\Service
{
    protected $examao;
    public function __construct()
    {
        $this->examao = new ExamDao();
    }
    public function getExam(){
        $exam = $this->examao
            ->getField(['id','studnet_id','name'])
            ->getAll();
        return $exam;
    }
    public function intoExam($data){
        try {
            return $this->examao->create($data);
        }catch (\Exception $exception) {

        }
    }
    public function deleteExam($id){
        try {
            return $this->examao->delete($id);
        } catch (\Exception $exception) {

        }
    }
}
